home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI520.ASC < prev    next >
Text File  |  1992-12-03  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  520
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  December 3, 1992                         PAGE  :  1/2
  12.  
  13.     TITLE  :  Rounding Values in a Field
  14.  
  15.  
  16.  
  17.  
  18.   This Technical Information sheet illustrates how you can use the
  19.   PAL ROUND() function to round the values in a particular field to
  20.   a specified number of digits.  At the end of the document there
  21.   is a line by line explanation of the PAL code.  Before making
  22.   global changes to a table, it's a good idea to first make a
  23.   backup copy of the table using Tools | Copy | Table.
  24.  
  25.      1.  To enter a script that will round the values in a specific
  26.          field, select <F10> Scripts | Editor | New (For versions
  27.          earlier than 4.0, select Write instead of New) and type
  28.          ROUND and press <ENTER>.  On the screen, type the
  29.          following code:
  30.  
  31.  
  32.          EDIT "Table_Name"
  33.          MOVETO [Field_Name]
  34.          SCAN
  35.          []=ROUND([],n)
  36.          ENDSCAN
  37.  
  38.  
  39.      2.  To play the script, select <F10> Scripts | Play, type
  40.          ROUND and press <ENTER>.
  41.  
  42.  
  43.   For additional information on PAL, refer to the PAL Reference
  44.   Guide (for versions earlier than 4.0, refer to the PAL User's
  45.   Guide).  For additional information on how computers and Paradox
  46.   uses numbers, refer to Technical Information sheet number 1148.
  47.  
  48.  
  49.   Explanation of the PAL Code:_____________________________________
  50.  
  51.   EDIT "Table_name"       Selects the table.  Replace the word
  52.                           Table_Name with the actual name of your
  53.                           table.  Don't forget to type the
  54.                           quotation marks.
  55.  
  56.   MOVETO [Field_name]     Selects the field.  Replace the word
  57.                           Field_Name with the name of the field to
  58.                           be changed.  Don't forget to type the
  59.                           square brackets.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  520
  75.   VERSION  :  All
  76.        OS  :  DOS
  77.      DATE  :  December 3, 1992                         PAGE  :  2/2
  78.  
  79.     TITLE  :  Rounding Values in a Field
  80.  
  81.  
  82.  
  83.  
  84.   SCAN                    Tell Paradox to scan through record by
  85.                           record.
  86.  
  87.   []=ROUND([],n)          Does the actual rounding.  Replace n with
  88.                           the number of decimal places desired.
  89.  
  90.   ENDSCAN                 Ends the scan.
  91.  
  92.   DISCLAIMER: You have the right to use this technical information
  93.   subject to the terms of the No-Nonsense License Statement that
  94.   you received with the Borland product to which this information
  95.   pertains.
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.